import Index from '@/components/Index.vue'
import Regist from '@/components/Regist'
import Login from '@/components/Login'
import Resource from '@/components/Resource'
import Active from '@/components/Active/Active'
import Change from '@/components/Change'
import Collect from '@/components/Collect'
import BindPhone from '@/components/BindPhone'
import Eyes from '@/components/Eyes'
import PaperDetail from '@/components/PaperDetail'
import MyApply from '@/components/Active/MyApply'
import AppendUnit from '@/components/Active/AppendUnit'
import PaperApply from '@/components/Active/PaperApply'
import alreadyApply from '@/components/Active/alreadyApply'
import Apply from '@/components/Active/Apply'
import ResourceDetail from '@/components/ResourceDetail/ResourceDetail'
import OssUpload from '@/components/Test/OssUpload'
import FixUpload from '@/components/Test/FixUpload'
import Up from '@/components/Test/Up'
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

//二级路由
import Rating from '@/components/ResourceDetail/Rating'
import Lesson from '@/components/ResourceDetail/Lesson'
export default new Router({
  routes:[
      {path: '/', redirect:'/Login'},
      {path: '/Index',name: 'Index',component:resolve => require(['@/components/Index'],resolve) ,meta:{title:"个人"}},
      {path: '/Cert',name: 'Cert',component:resolve => require(['@/components/Cert/Cert'],resolve) ,meta:{title:"我的证书"}},
      {path: '/CertDetail',name: 'CertDetail',component:resolve => require(['@/components/Cert/CertDetail'],resolve) ,meta:{title:"证书详情"}},
      {path: '/myExamine',name: 'myExamine',component:resolve => require(['@/components/Examine/myExamine'],resolve) ,meta:{title:"我的审批"}},
      {path: '/ExamineDetail',name: 'ExamineDetail',component:resolve => require(['@/components/Examine/ExamineDetail'],resolve) ,meta:{title:"审批"}},
      {path: '/Login',name: 'Login',component:resolve => require(['@/components/Login'],resolve),meta:{title:"登录"}},
      {path: '/Regist',name: 'Regist',component:resolve => require(['@/components/Regist'],resolve),meta:{title:"注册"}},
      {path: '/Resource',name: 'Resource',component:resolve => require(['@/components/Resource'],resolve),meta:{title:"资源查看"}},
      {path: '/Active',name: 'Active',component:resolve => require(['@/components/Active/Active'],resolve),meta:{title:"活动"}},
      {path: '/Change',name: 'Change',component:resolve => require(['@/components/Change'],resolve),meta:{title:"修改绑定"}},
      {path: '/Collect',name: 'Collect',component:resolve => require(['@/components/Collect'],resolve),meta:{title:"我的收藏"}},
      {path: '/AppendUnit',name: 'AppendUnit',component:resolve => require(['@/components/Active/AppendUnit'],resolve),meta:{title:"新增单位"}},
      {path: '/BindPhone',name: 'BindPhone',component:resolve => require(['@/components/BindPhone'],resolve),meta:{title:"绑定手机号"}},
      {path: '/PaperDetail',name: 'PaperDetail',component:resolve => require(['@/components/PaperDetail'],resolve),children:[
          {path: '/', redirect:'/Lesson'},
          {path: '/Rating',name: 'Rating',component:Rating},
          {path: '/Lesson',name: 'Lesson',component:Lesson},
        ],meta:{title:"论文详情"}},
      {path: '/Eyes',name: 'Eyes',component:resolve => require(['@/components/Eyes'],resolve),meta:{title:"我的浏览"}},
      {path: '/PaperApply',name: 'PaperApply',component:resolve => require(['@/components/Active/PaperApply'],resolve),meta:{title:"申报情况"}},
      {path: '/alreadyApply',name: 'alreadyApply',component:resolve => require(['@/components/Active/alreadyApply'],resolve)},
      {path: '/Apply',name: 'Apply',component:resolve => require(['@/components/Active/Apply'],resolve),meta:{title:"我的申报"}},
      {path: '/MyApply',name: 'MyApply',component:resolve => require(['@/components/Active/MyApply'],resolve)},
      {path: '/ResourceDetail',name: 'ResourceDetail',component:resolve => require(['@/components/ResourceDetail/ResourceDetail'],resolve),meta:{title:"资源详情"}},
      {path: '/OssUpload', name: 'OssUpload', component: OssUpload},
      {path: '/FixUpload', name: 'FixUpload', component: FixUpload},
      {path: '/Up', name: 'Up', component: Up},
      ]
})


